import { defineComponent, PropType } from 'vue'

import styles from './style.module.scss'

interface IProps {
  typeTitle: string
  imageUrl: string
  className?: string
  onClick?: () => void
}

export default defineComponent({
  name: '',
  props: {
    typeTitle: String as PropType<string>,
    imageUrl: String as PropType<string>,
    className: {
      type: Array as PropType<string[]>,
      required: true,
    },
    onClick: Function,
  },
  setup(props) {
    return () => {
      return (
        <>
          <div class={[styles.root, ...props.className]}>
            <img src={props.imageUrl} />
            <div class={styles.type}>{props.typeTitle}</div>
          </div>
        </>
      )
    }
  },
})
